\chapter{Conclusion}
\label{cha:conclusion}

\section{Summary}

This thesis had as main objective to research a solution to achieve role
delegation based on code migration in a MAS setting. A framework called OSGi has
some promising characteristics to achieve code migration in distributed systems.
The research of this thesis was understanding the code migration and how we can
achieve that with the OSGi environment. That migration must be implemented in a
MAS context. In very dynamic environments it could benefit is some roles can be
exchanged between different agents. Therefore a model was made that represents
an agent, where the concrete elements for role delegation were discussed.
Afterwards that model will be mapped on a OSGi service component structure that
will enable the use of code migration between agents. Now we have an agent
architecture based on the OSGi technology that needs to be tested. We have set
up an adapted general pickup and delivery problem. There we implemented the
agents with the proper roles in a simulation environment. From test we can see
that we developed an architecture that is capable of exchanging roles such that
other agents can execute non-native tasks. 

\section{Summary of contributions}


With this research we achieved to give a solution for the problems we had and we
can give an answer to the questions we had. 

As the research for role delegation in a MAS context is still a hot topic, this
research came up with an architecture for agents that included role delegation
based on code migration. The suggested framework to achieve the goal, OSGi, was
capable to deliver a very good base for implementing the code migration. To add
strong migration we had to do more research about OSGi and add extra
technologies. This research made the code migration possible, even with strong
migration, in the context of MAS with role delegation. Since this is a draft
architecture, it only proves the possibilities of OSGi and is generalized
for some range of problems. It will not provide a complete standard for all the
problems.

Prior to the OSGi implementation we have built an agent model where we made
components like tasks and roles concrete to achieve a proper role delegation.
Together with that model a commitment strategy for proper scheduling was added.
This is needed to keep some order in the highly dynamic environments. We
realized in some extent the role and task delegation for MAS. Agents were able
to exchange tasks and roles in a dynamic way but due to time issues the
implementation of external reschduling was dropped and could not be tested in
the demo.

To conclude OSGi is a framework with good future perspectives to support the
development of multi-agent systems. It proved the marketing claims about the
reusability and the easy development in a component-like structure. But using
OSGi needs another kind of thinking since it is somehow different than ordinary
Java programming. The bundles, that are presented in the research, work, but
could be better designed to achieve more generalization.  

\section{Future work}

This research could be a start to investigate more in MAS architectures based on
a service based framework, OSGi in particular. Our research proved that an
agent architecture based on OSGi benifits if we need code migration. It also
proved that a lot of extensions could be made easily. 

In this thesis only a draft of an agent architecture is presented and
performance tests were out of the scope of this research. Thus expanding the
research on refining and re-engineering the architecture could have a positive
effect in the field of MAS and code migration.

Other research for comparing solutions must be conducted to actually proof if
OSGi outperforms other solutions based on certain performance indicators.

Another path that could be investigated is the dynamic execution environment of
OSGi. It alows us to dynamically install, uninstall and update components and
thus executable code. It also means every bundle can be updated with minimal
downtime. If robots or agents need a software updates for a critical component,
the OSGi framework allows that this update happens in a proper way and with
minimal of downtime. This is a benifit that may start up new research topics.

While there are many problems suitable to be solved with MAS, whe only tried to
solve an adapted version of the GPDP. More research can be done on more problems
where role migration and code migration can help solve the problem. Solutions
based on OSGi may be developed and tested for many different problem areas.

This thesis can open some doors to do more research on the OSGi framework in the
context of MAS. 